Add dict-based metadata pipeline for imaging #1677
Merged
h-mayorquin merged 13 commits intomainfrom Mar 4, 2026
Merged
Conversation
pauladkisson
reviewed
Mar 4, 2026
pauladkisson
reviewed
Mar 4, 2026
Member
pauladkisson
left a comment
There was a problem hiding this comment.
A couple nits, otherwise looks good.
pauladkisson
approved these changes
Mar 4, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1677 +/- ##
==========================================
+ Coverage 81.01% 81.08% +0.06%
==========================================
Files 160 160
Lines 12471 12574 +103
==========================================
+ Hits 10104 10195 +91
- Misses 2367 2379 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #269
Implements the dict-based metadata pipeline for imaging extractors as discussed in #1653.
add_imaging_to_nwbfilenow accepts the new dict-based metadata format keyed bymetadata_key. When old metadata is passed, the data goes through an alternative path, effectively segregating new and old formats. This keeps the functions backwards compatible and the diff simpler. New helper functions (_add_imaging_plane_to_nwbfile,_add_photon_series_to_nwbfile,_add_device_to_nwbfile) handle the dict-based format, while old list-based functions are renamed with an_old_list_formatsuffix to handle the old one.We introduce
get_full_ophys_metadata()which provides a user-facing example template (moving forward with #1557). When users provide metadata with missing required fields, a clearValueErroris raised listing the missing fields and their placeholders. See also NeurodataWithoutBorders/nwb-schema#672 for some of the design rationale.Closes #1653. Related: #1511, nwb-schema#672.